/**
 * 
 */
package com.pcbly.web.persistence.chart;

import java.util.List;


import com.pcbly.web.bean.chart.ChartDataValueBean;
import com.pcbly.web.persistence.HibernateBaseDao;

/**
 * @author Administrator
 * 
 */
public class ChartDataValueHibernateDao extends
		HibernateBaseDao<ChartDataValueBean> implements ChartDataValueDao {

	/**
	 * 
	 */
	private static final long serialVersionUID = 949147039082618997L;

	public ChartDataValueHibernateDao() {
		super();
	}

	protected Class<ChartDataValueBean> getEntityClass() {
		return ChartDataValueBean.class;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	@Override
	public int deleteChartDataValueBean(String id) throws Exception {
		// TODO Auto-generated method stub
		super.removeById(entityClass, id);
		return 1;
	}

	@Override
	public int insertChartDataValueBean(ChartDataValueBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		getHibernateTemplate().save(bean);
		return 1;
	}

	@Override
	public ChartDataValueBean queryChartDataValueBeanById(String id)
			throws Exception {
		// TODO Auto-generated method stub
		return super.get(entityClass, id);
	}

	@Override
	public int updateChartDataValueBean(ChartDataValueBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		getHibernateTemplate().update(bean);
		return 1;
	}

	@Override
	public List<ChartDataValueBean> queryList() throws Exception {
		// TODO Auto-generated method stub
		return super.getAll(entityClass);
	}

}
